package org.leviatan.dataharbour.gui.swingmodels;

import javax.swing.tree.DefaultMutableTreeNode;

import org.leviatan.dataharbour.core.model.DataSource;

public class TreeNodeMdlDataSource extends DefaultMutableTreeNode {

	private static final long serialVersionUID = 3831217060212770338L;

	private String id;
	
	private String name;
	
	private DataSource theMdl;

	

	
	public TreeNodeMdlDataSource(DataSource dataSource) {
		super();
		this.theMdl = dataSource;
		//HarbourRequestHandler.assignGeneratedIds(this.theMdl);
		this.id = dataSource.getId();
		this.name = dataSource.getName();
		this.setUserObject(this);
	}

	public String getId() {
		return this.id;
	}

	public String getName() {
		return this.name;
	}

	public void setId(String aId) {
		this.id = aId;
	}

	public void setName(String aName) {
		this.name = aName;
	}
	
	public String toString() {
		return "[DataSource] " + this.name;	
	}

	public DataSource getTheMdl() {
		return theMdl;
	}

	public void setTheMdl(DataSource theMdl) {
		this.theMdl = theMdl;
	}

}
